package cn.tedu.mydemomvchighly.service.impl;

import cn.tedu.mydemomvchighly.dao.persist.repository.IUserRepository;
import cn.tedu.mydemomvchighly.pojo.entity.User;
import cn.tedu.mydemomvchighly.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    IUserRepository iUserRepository;

    @Override
    public int insertUser(User user) {

        iUserRepository.insert(user);
        return 0;
    }

    @Override
    public int login(User user) {

        return 0;
    }

    @Override
    public List<User> getUsers() {
        return iUserRepository.getUsers();
    }
}
